<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="">

		<title>Dashboard Template for Bootstrap</title>
		<!-- Bootstrap core CSS -->
		<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

		<!-- Custom styles for this template -->
		<link th:href="@{/css/dashboard.css}" rel="stylesheet">
		<!-- bootstrap样式表 -->
		<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

		<!-- 时间选择器样式表 -->
		<link href="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" rel="stylesheet">


		<!-- jquery -->
		<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>

		<!-- bootstrap脚本 -->
		<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

		<!-- 时间选择器前置脚本 -->
		<script src="https://cdn.bootcss.com/moment.js/2.22.1/moment-with-locales.min.js"></script>

		<!-- 时间选择器核心脚本 -->
		<script src="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
		<style type="text/css">
			/* Chart.js */
			
			@-webkit-keyframes chartjs-render-animation {
				from {
					opacity: 0.99
				}
				to {
					opacity: 1
				}
			}
			
			@keyframes chartjs-render-animation {
				from {
					opacity: 0.99
				}
				to {
					opacity: 1
				}
			}
			
			.chartjs-render-monitor {
				-webkit-animation: chartjs-render-animation 0.001s;
				animation: chartjs-render-animation 0.001s;
			}
		</style>
	</head>

	<body>
		<div th:insert="~{/common/common::head}"></div>

		<div class="container-fluid">
			<div class="row">
				<div th:replace="~{/common/common::sideBar(active='list.html')}"></div>

				<main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
					<form th:action="@{/updateEmp}" method="post">
						<input type="hidden" name="empId" th:value="${emp.getEmpId()}">
						<div class="form-group">
							<label>name</label>
							<input type="text" class="form-control" name="name" th:value="${emp.getName()}">
						</div>
						<div class="form-group">
							<label>age</label>
							<input type="number" class="form-control" name="age" th:value="${emp.getAge()}">
						</div>
						<div class="form-group">

							<label>Gender</label><br>
							<div class="form-check form-check-inline">
								<input class="form-check-input" type="radio" name="sex" value="1" th:checked="${emp.getSex()=='1'}">
								<label class="form-check-label">男</label>
							</div>
							<div class="form-check form-check-inline">
								<input class="form-check-input" type="radio" name="sex" value="0" th:checked="${emp.getSex()=='0'}">
								<label class="form-check-label">女</label>
							</div>
						</div>
						<div class="form-group">
							<label>sal</label>
							<input type="number" class="form-control" name="sal" th:value="${emp.getSal()}">
						</div>
						<div class="form-group">
							<label>address</label>
							<input type="text" class="form-control" name="address" th:value="${emp.getAddress()}">
						</div>
						<div class="form-group">
							<label>department</label>
							<select class="form-control" name="department.deptId">
							<option th:selected="${dept.getDeptId()==emp.getDepartment().getDeptId()}"
									th:each="dept:${departments}"
									th:text="${dept.getDeptName()}"
									th:value="${dept.getDeptId()}"></option>
						</select>
						</div>
						<div class="form-group">
							<label>Birth</label>
							<input th:value="${#dates.format(emp.getBirthday(),'yyyy-MM-dd')}" type="text" class="form-control" name="birthday" id="datetime">
						</div>
						<button class="btn btn-primary">修改</button>
					</form>
				</main>
			</div>
		</div>

		<!-- Bootstrap core JavaScript
    ================================================== -->
		<!-- Placed at the end of the document so the pages load faster -->
		<script>
			$("#datetime").datetimepicker({
				format: 'YYYY-MM-DD',
				locale: moment.locale('zh-CN')
			});
		</script>
		<script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js"></script>
		<script type="text/javascript" src="asserts/js/popper.min.js"></script>
		<script type="text/javascript" src="asserts/js/bootstrap.min.js"></script>

		<!-- Icons -->
		<script type="text/javascript" src="asserts/js/feather.min.js"></script>
		<script>
			feather.replace()
		</script>

		<!-- Graphs -->
		<script type="text/javascript" src="asserts/js/Chart.min.js"></script>
		<script>
			var ctx = document.getElementById("myChart");
			var myChart = new Chart(ctx, {
				type: 'line',
				data: {
					labels: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
					datasets: [{
						data: [15339, 21345, 18483, 24003, 23489, 24092, 12034],
						lineTension: 0,
						backgroundColor: 'transparent',
						borderColor: '#007bff',
						borderWidth: 4,
						pointBackgroundColor: '#007bff'
					}]
				},
				options: {
					scales: {
						yAxes: [{
							ticks: {
								beginAtZero: false
							}
						}]
					},
					legend: {
						display: false,
					}
				}
			});
		</script>

	</body>

</html>